# encoding=utf-8
import sqlite3

con = sqlite3.connect('/Users/graceli/project/PythonTestProject/my02/数据表/demo.db')
cur = con.cursor()
sql = 'select * from t_person'

try:

    cur.execute(sql)
    person_all = cur.fetchall()


    for person in person_all:
        print(person)

except Exception as e:
    print(e)
    print('查询所有数据失败')
finally:
    cur.close()
    con.close()